package com.ccc.hotsearch.dto;

import lombok.Data;

@Data
public class HotSearchResponse {
    private boolean success;
    private String message;
    private Object data;
    private Long timestamp;

    public static HotSearchResponse success(Object data) {
        HotSearchResponse response = new HotSearchResponse();
        response.success = true;
        response.message = "success";
        response.data = data;
        response.timestamp = System.currentTimeMillis();
        return response;
    }

    public static HotSearchResponse error(String message) {
        HotSearchResponse response = new HotSearchResponse();
        response.success = false;
        response.message = message;
        response.timestamp = System.currentTimeMillis();
        return response;
    }
}
